64b924a99a25fb00125bf9088f90b6a1accf9111,platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/AbstractEditorTest.java,AbstractEditorTest,foldOccurrences,#String#String#,121

Before Change



  protected static void foldOccurrences(String textToFoldRegexp, final String placeholder) {
    final Matcher matcher = Pattern.compile(textToFoldRegexp).matcher(myEditor.getDocument().getCharsSequence());
    myEditor.getFoldingModel().runBatchFoldingOperation(new Runnable() {
      @Override
      public void run() {
        while (matcher.find()) {
          FoldRegion foldRegion = myEditor.getFoldingModel().addFoldRegion(matcher.start(), matcher.end(), placeholder);
          assertNotNull(foldRegion);
          foldRegion.setExpanded(false);
        }
      }
    });
  }

  /**

After Change



  protected static void foldOccurrences(String textToFoldRegexp, final String placeholder) {
    final Matcher matcher = Pattern.compile(textToFoldRegexp).matcher(myEditor.getDocument().getCharsSequence());
    myEditor.getFoldingModel().runBatchFoldingOperation(() -> {
      while (matcher.find()) {
        FoldRegion foldRegion = myEditor.getFoldingModel().addFoldRegion(matcher.start(), matcher.end(), placeholder);
        assertNotNull(foldRegion);
        foldRegion.setExpanded(false);
      }
    });
  }

  /**